package com.zxgj.datadirect.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zxgj.datadirect.domain.DataDirectExchangeTask;
import com.zxgj.datadirect.dto.ExchangeTaskCreateReq;
import com.zxgj.datadirect.dto.ExchangeTaskLogResp;
import com.zxgj.datadirect.entity.resp.CommonResp;


import java.util.List;

public interface DataDirectExchangeTaskService {

    // 创建任务
    CommonResp<DataDirectExchangeTask> createTask(DataDirectExchangeTask task);

    // 查询任务列表
    CommonResp<List<DataDirectExchangeTask>> listTasks(String status);

    // 执行数据交换（核心业务方法）
    CommonResp<Boolean> executeExchange(Long taskId);

    // 取消任务
    CommonResp<Boolean> cancelTask(Long taskId);

    Long createExchangeTask(ExchangeTaskCreateReq req);

    boolean controlExchangeTask(Long taskId, Integer operateType, ExchangeTaskCreateReq req);

    List<DataDirectExchangeTask> list(LambdaQueryWrapper<DataDirectExchangeTask> wrapper);

    List<ExchangeTaskLogResp> getExchangeTaskLogs(Long taskId, String startTime, String endTime);
}